package com.ruitu.mall_98_1.product.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.beanu.arad.Arad;
import com.beanu.arad.base.my_base.Config;
import com.beanu.arad.base.my_base.base_list.ListBaseAdapter;
import com.beanu.arad.base.my_base.base_list.SuperViewHolder;
import com.bumptech.glide.Glide;
import com.ruitu.mall_98_1.R;
import com.ruitu.router_module.bean.product.GroupUser;

public class GroupUserAdapter extends ListBaseAdapter<GroupUser> {
    public GroupUserAdapter(Context context) {
        super(context);
    }

    @Override
    public int getLayoutId() {
        return R.layout.pro_item_group_user;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        TextView tv_name = holder.getView(R.id.tv_name);
        ImageView header = holder.getView(R.id.header);

        GroupUser u = mDataList.get(position);
        tv_name.setText(u.getNickName());
        Glide.with(Arad.app).load(Config.BASE_URL + u.getImageUrl())
                .apply(Arad.opts_circle).into(header);
    }
}
